<include file="public@header"/>
<link href="__STATIC__/js/date/style.css" type="text/css" rel="stylesheet" />
<link href="__STATIC__/js/selectpicker/css/bootstrap-select.min.css" type="text/css" rel="stylesheet" />
</head>
<body>
<div class="wrap js-check-wrap">
	<div  class="row">
		<div class="col-md-8">
			<div class="aboluo-w-700" style="margin:auto">
				<div class="aboluo-leftdiv">
					<div class="aboluo-tools">
						<div class="aboluo-calendar-select-year">
							<select style="width:90px;height:34px;" name="aboluo-yearSelect" id="aboluo-yearSelect"></select>
						</div>
						<div class="aboluo-calendar-month">
							<a class="aboluo-month-a-perv" href="javascript:;">&lt; </a>
							<a class="aboluo-month-a-next" href="javascript:;"> &gt;</a>
						</div>
						<div style="float:right;margin-right:20px;"><input type="button" class="aboluo-toToday btn btn-primary" value="返回今天" /></div>
					</div>
					<div class="aboluo-rilidiv">
						<table class="aboluo-rilitable" cellspacing="0" cellpadding="0" >
							<thead class="aboluo-rilithead">
								<tr>
									<th>一</td>
									<th>二</td>
									<th>三</td>
									<th>四</td>
									<th>五</td>
									<th style="color:red;">六</td>
									<th style="color:red;">日</td>
								</tr>
							</thead>
						</table>
					</div>
				</div>
			</div>
		</div>
		<div class="col-md-4">
			<div style="margin-right:10%;">
				<p id="select_date_info" style="text-align:center;font-size:20px;">{:date('Y年m月d日')}</p>
				
			</div>
		</div>
	</div>
</div>

<script type="text/javascript" src="__STATIC__/js/selectpicker/js/bootstrap-select.js"></script>
<script type="text/javascript">
var timetable_data = '';
$(function(){
		class_day = eval({$data});
		setdata(class_day);
		createSelectYear();  //创建年份下拉,并给对应事件
		createMonthSelect();  //创建月份下拉，并给对应事件
		//根据年，月，用table绘制日历。 年月变动则 重新绘制
		createTabledate(parseInt(withID("aboluo-yearSelect").value),parseInt(withID("aboluo-selectmonth").value));
		//上月下月的a标签给事件
		leftrightclick();
		$(".aboluo-currToday").trigger("click");
	});
	
	
function setInfo(event){
	if($("a").hasClass('aboluo-aclick')){$("a[class='aboluo-aclick']").attr('class','');}
	event.setAttribute('class','aboluo-aclick');
	var date = new Date(event.getAttribute("date"));
	var html = '';
	$("#select_date_info").html(date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+'日'+' '+getWeek(date.getDay()));
	$("#select_date_info").append('<p class="aboluo-currday" style="line-height:100px;">'+date.getDate()+'</p>');
	var is_class_day = event.getAttribute("jjrzt");
	if(is_class_day){
		// 课
		var id = event.getAttribute("ztid");
		html = '<li style="font-size:22px;">'+class_day[id]['class_name']+'</li>'+
				'<p style="text-align:center;font-size:20px;">第'+class_day[id]['times']+'次课，共'+class_day[id]['class_number']+'次</p>'+
				'<p style="text-align:center;font-size:20px;">任课老师：'+class_day[id]['teacher_name']+'</p>'+
				'<p style="text-align:center;font-size:20px;">教室：'+class_day[id]['classroom_name']+'</p>'+
				'<p style="text-align:center;font-size:20px;">时间：'+class_day[id]['start_time']+'-'+class_day[id]['end_time']+'</p>';
		timetable_data = class_day[id];
	}
	else{
		// 没课
		html = '<li>没有课程安排！</li>'
	}
	$("#select_date_info").append(html);
}

    function confirm() {
		return timetable_data;
    }
</script>
<script type="text/javascript" src="__STATIC__/js/date/date_view.js"></script>
<!-- 代码 结束 -->
</body>
</html>
